'use strict';

function Product(name, price) {
    this.name = name;
    this.price = price;
}

function Food(name, price) {
    Product.call(this, name, price);
}

const cheese = new Food('feta', 5);
console.log(cheese);
console.log('is food:', cheese instanceof Food);
console.log('is product:', cheese instanceof Product);

var sData = 'Wisen';
function display() {
    console.log('sData value is %s ', this.sData);
}

try {
    display.call();
} catch(e) {
    console.log('catch a error:', e.message);
}
